Component({
    properties: {},
    data: {
        popShow: !1,
        day_list: [],
        day_index: 0,
        time_list: [],
        time_index: null
    },
    methods: {
        setPopShow: function() {
            0 != this.data.day_list.length ? this.setData({
                popShow: !this.data.popShow
            }) : wx.showModal({
                title: "提示",
                showCancel: !1,
                content: "该地区暂无取货服务，请修改其他地址",
                success: function(t) {}
            });
        },
        setListData: function(t) {
            this.setData({
                day_list: t,
                time_list: t[0] && t[0].pickupTimeRangeList || []
            });
        },
        setTimeList: function(t) {
            var i = t.currentTarget.dataset.index;
            this.data.day_index != i && this.setData({
                day_index: i,
                time_index: null,
                time_list: this.data.day_list[i] && this.data.day_list[i].pickupTimeRangeList || []
            });
        },
        send: function(t) {
            var i = t.currentTarget.dataset.index;
            this.setData({
                time_index: i
            });
            var e = this.data.day_list[this.data.day_index].complete_day, a = e + " " + this.data.time_list[i].pickupStartTime, s = e + " " + this.data.time_list[i].pickupEndTime;
            console.log(a, s), this.triggerEvent("confirm", {
                start_time: a,
                end_time: s
            }), this.setPopShow();
        }
    }
});